Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 3 - Image Compression Manager / Image Compression Manager Reference
Image Compression Manager Functions / Working With Graphics Devices and Graphics Worlds


NewImageGWorld

The NewImageGWorld function creates a graphics world from the width, height, depth, and color table of a specified image-description structure.

pascal QDErr NewImageGWorld (GWorldPtr *gworld, 
                              ImageDescription **idh, 
                              GWorldFlags flags);
gworld
Contains a pointer to a graphic world created using the width, height, depth, and color table specified in the image description structure pointed to in the idh parameter.
idh
Contains a handle to an image description structure with information for the graphics world pointed to by the gworld parameter.
flags
Contains graphics world flags. These flags are passed directly through to the NewGWorld function. (For details on NewGWorld, see Inside Macintosh: Devices.)
DESCRIPTION
The NewImageGWorld function selects the appropriate color table using the depth field or custom color table in the image description structure. It creates a 32-bit-deep graphics world if the depth specified in the image description structure is 24.

SPECIAL CONSIDERATIONS
You are responsible for disposing of the graphics world with the DisposeGWorld routine. (For more on DisposeGWorld, see Inside Macintosh: Devices.)

RESULT CODES
noErr0No error
paramErr-50Invalid parameter specified
cDepthErr-157Invalid pixel resolution

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996